<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>

<table align="center" border="0" cellpadding="0" cellspacing="1" bgcolor="#6dfff2" width="800">

	<tr height="25" style="text-align:center">
		<td><a href="itemList.do">상품목록</a></td>
		<td><a href="itemInsert.do">상품등록</a></td>
	</tr>

	<br/>
	
	
<form:form commandName="itemCommand" action="updateItem.do" enctype="multipart/form-data" method="post">
	
	<table align="center" width="720">
		<tr height="250" border="1" align="center">
			<td width="50%">
				<img src="../upload/${itemCommand.i_image1 }" width = "200" height= "200"><br/>
			</td>
			<td valign="middle" align="left" width="50%">
			<form:hidden path="i_no"/>
			<form:hidden path="i_image1"/>
				상품 분류 : <form:input path="i_category" value="${itemCommand.i_category }"/><br/>
				상품 이름 : <form:input path="i_name" value="${itemCommand.i_name }"/><br/>
				<form:errors path="i_name"/><br/>
				상품 단가 : <form:input path="i_price" value="${itemCommand.i_price }"/><br/>
				<form:errors path="i_price"/><br/>
				상품 수량 : <form:input path="i_ea" value="${itemCommand.i_ea }"/><br/>
				<form:errors path="i_ea"/><br/>
				상품 이미지 : <input type="file" name="upload"/>
			</td>				
		</tr>
		<tr>
			<td colspan="2">
				<textarea rows="5" cols="100" name="i_content">${itemCommand.i_content }</textarea>
			</td>
		</tr>
		<tr>
			<td colspan="2">
				<input type="submit" value="확인"/>
				<input type="button" value="삭제" onclick="location.href='deleteItem.do?i_no=${itemCommand.i_no}'"/>
				<input type="button" value="목록" onclick="location.href='itemList.do'"/>
			</td>
		</tr>
	</table>


</table>


</form:form>